Pearson Edexcel · GCSE · Computer Science
Course version: 1CP2 · Version from Sept 2020
Be able to convert between denary and 8-bit binary numbers (0 to 255, -128…
Full specification wording
Binary: 2.1.3 be able to convert between denary and 8-bit binary numbers (0 to 255, -128 to +127)
This topic teaches conversion between denary and 8-bit binary in two ranges: unsigned 0 to 255 and signed -128 to +127.
Checked against the Pearson Edexcel 1CP2 specification (opens in a new tab) on .
- Point 3 of 6
- 4 key terms
Study notes
From the checked teaching notes for this specification point.
The idea
This topic teaches conversion between denary and 8-bit binary in two ranges: unsigned 0 to 255 and signed -128 to +127. For unsigned conversion, use place values 128, 64, 32, 16, 8, 4, 2, 1. To convert denary to binary, subtract the largest place value that fits, set that bit to 1, and repeat with the remainder until it is zero; fill remaining bits with 0. For example, 200 = 128 + 64 + 8, giving 11001000. To convert binary to denary, add the place values where the bit is 1. For signed numbers, the leftmost bit has place value -128; the other bits keep 64, 32, 16, 8, 4, 2, 1. For example, 10000001 = -128 + 1 = -127. Always state whether the pattern is unsigned or signed, because the same 8 bits can mean different values.
What earns the marks
- Unsigned denary-to-binary: subtract place values 128, 64, 32, 16, 8, 4, 2, 1 from the denary number, setting a 1 where each value fits and a 0 where it does not, until the remainder is zero.
- Unsigned binary-to-denary: add the place values of the bits that are 1; for example 11001000 = 128 + 64 + 8 = 200.
- Signed binary-to-denary: treat the leftmost bit as -128 and add the place values of any other 1 bits; for example 10000001 = -128 + 1 = -127.
- Range check: unsigned 8-bit patterns represent 0 to 255; signed 8-bit patterns represent -128 to +127; state which interpretation is being used.
Common mistakes and how to put them right
Treating the leftmost bit as +128 in a signed pattern.
Put it right: In signed 8-bit two's complement, the leftmost bit has place value -128, so 10000000 is -128, not 128.
Forgetting to add 1 after inverting the bits when converting a negative denary number to binary.
Put it right: The two's complement method is invert all bits, then add 1 to the least significant bit.
Writing binary patterns with the wrong number of bits, such as 7 bits for 200.
Put it right: Pad to exactly 8 bits, so 200 is 11001000, not 1100100.
Confusing the unsigned and signed ranges.
Put it right: Unsigned 8-bit values run from 0 to 255; signed 8-bit values run from -128 to +127.
Exam tips
- Show your place-value working, especially for signed conversions, so the examiner can see how you reached the pattern.
- Check the range in the question: if it says -128 to +127, use two's complement; if it says 0 to 255, use unsigned place values.
- After converting, verify by converting back: add the place values of the 1 bits and check you get the original denary number.
Try the lesson
The start of the Binary: 2.1.3 be able to convert between denary and 8-bit binary numbers (0 to 255, -128 to +127) lesson, made from checked teaching notes for this specification point.
Have a go first
Convert the denary number 37 to an 8-bit binary number.
Listen
This topic teaches conversion between denary and 8-bit binary in two ranges: unsigned 0 to 255 and signed -128 to +127. For unsigned conversion, use place values 128, 64, 32, 16, 8, 4, 2, 1. To convert denary to binary, subtract the largest place value that fits, set that bit to 1, and repeat with the remainder until it is zero; fill remaining bits with 0. For example, 200 = 128 + 64 + 8, giving 11001000. To convert binary to denary, add the place values where the bit is 1. For signed numbers, the leftmost bit has place value -128; the other bits keep 64, 32, 16, 8, 4, 2, 1. For example, 10000001 = -128 + 1 = -127. Always state whether the pattern is unsigned or signed, because the same 8 bits can mean different values. A strong answer earns marks for these points. Unsigned denary-to-binary: subtract place values 128, 64, 32, 16, 8, 4, 2, 1 from the denary number, setting a 1 where each value fits and a 0 where it does not, until the remainder is zero. Unsigned binary-to-denary: add the place values of the bits that are 1; for example 11001000 = 128 + 64 + 8 = 200. Signed denary-to-binary: for a negative value, find the positive magnitude, convert it to 8 bits, invert every bit, then add 1 to the least significant bit; for example -127: 127 = 01111111, invert to 10000000, add 1 to get 10000001. Signed binary-to-denary: treat the leftmost bit as -128 and add the place values of any other 1 bits; for example 10000001 = -128 + 1 = -127. A common slip: Treating the leftmost bit as +128 in a signed pattern. Instead, in signed 8-bit two's complement, the leftmost bit has place value -128, so 10000000 is -128, not 128. Exam tip: Show your place-value working, especially for signed conversions, so the examiner can see how you reached the pattern.
See it
Key words
Say what each word means before you turn the card.
Place value in base 2
Try answering aloud or in your head before turning the card.
Unsigned 8-bit range 0 to 255
Try answering aloud or in your head before turning the card.
Signed 8-bit range -128 to +127
Try answering aloud or in your head before turning the card.
Two's complement representation
Try answering aloud or in your head before turning the card.
See every definition
- Place value in base 2
- The values 128, 64, 32, 16, 8, 4, 2 and 1 used for unsigned conversion, where a bit set to 1 adds its place value.
- Unsigned 8-bit range 0 to 255
- The range of values represented by 8-bit patterns interpreted as unsigned, running from 0 to 255.
- Signed 8-bit range -128 to +127
- The range of values represented by 8-bit patterns interpreted as signed, running from -128 to +127.
- Two's complement representation
- A signed 8-bit pattern in which the leftmost bit has place value -128 and the other bits keep 64, 32, 16, 8, 4, 2 and 1.
There is more to this lesson
The full lesson goes on to check your understanding and help you earn the marks. Create a free account to carry on, with your progress saved.
A week of Premium from your first lesson · Then the free plan continues · No card, no charge
Test your understanding of Binary: 2.1.3 be able to convert between denary and 8-bit binary numbers (0 to 255, -128 to +127)
Active recall beats re-reading. Take an instant quiz now to test what you’ve learned and lock it into long-term memory.
A week of Premium from your first lesson · Then the free plan continues · No card, no charge